<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml">

	<ui:define name="body">
		<s:div>
			<h:form style="display:inline;float:right">
				工作空间：
				<h:selectOneMenu value="#{switcher.conversationIdOrOutcome}">
	<!--			<f:selectItem itemLabel="Find Issues" itemValue="findIssue"/>-->
	<!--			<f:selectItem itemLabel="Create Issue" itemValue="editIssue"/>-->
					<f:selectItems value="#{switcher.selectItems}"/>
				</h:selectOneMenu>
				<h:commandButton action="#{switcher.select}" value="Switch"/>
			</h:form>
		</s:div>
		<h:messages globalOnly="true" styleClass="message"/>
		<rich:panel>
			<f:facet name="header">User List</f:facet>
			<h:form>
				<s:validateAll>
					<s:div>
						<h:commandButton action="#{administrator.addUser}" value="Add" />
						<h:commandButton action="#{administrator.deleteUsers}"
							value="Delete Chedked Users" />
						<h:commandButton value="Save Changes" action="#{administrator.saveUsers}" disabled="false"/>	
					</s:div>
					<s:div>
						<h:messages />
					</s:div>
					<h:dataTable value="#{administrableUsers}" var="item">
						<h:column>
							<h:selectBooleanCheckbox value="#{item.checked}"/>
						</h:column>
						<h:column>
							<f:facet name="header">用户名</f:facet>
	<!--						<h:outputText value="#{item.entity.username}"/>-->
							<h:inputText value="#{item.entity.username}" required="true" />
						</h:column>
						<h:column>
							<f:facet name="header">真实姓名</f:facet>
	<!--						<h:outputText value="#{item.entity.name}"/>-->
							<h:inputText value="#{item.entity.name}" required="true"/>
						</h:column>
						<h:column>
							<h:commandButton value="Delete" action="#{administrator.deleteUser}"/>
						</h:column>
					</h:dataTable>
					<s:div>
						<h:commandButton action="#{administrator.addUser}" value="Add" />
						<h:commandButton action="#{administrator.deleteUsers}"
							value="Delete Chedked Users" />
						<h:commandButton value="Save Changes" action="#{administrator.saveUsers}" disabled="false"/>	
					</s:div>
				</s:validateAll>
				
			</h:form>
			<s:div>
				<s:button action="#{administrator.endAdministration}" value="Exit User Administration"/>
			</s:div>
		</rich:panel>
	</ui:define>
</ui:composition>
